package com.xiaouyudeguang.common.dirule.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaouyudeguang.common.entity.BaseEntity;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dirule", autoResultMap = true)
@Table(name = "dirule", indexes = {})
public class DiRule extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Column(nullable = false, columnDefinition = "varchar(50)  comment '规则id'")
    private String ruleId;

    @Column(nullable = false, columnDefinition = "varchar(50)  comment '名称'")
    private String name;

    @Column(nullable = false, columnDefinition = "text  comment '规则内容'")
    private String content;

    @Column(nullable = false, columnDefinition = "varchar(50)  comment '分组id'")
    private String groupId;

    @Column(nullable = false, columnDefinition = "varchar(50)  default '2' comment '版本号'")
    private String version;

    @Column(nullable = false, columnDefinition = "bigint  default 30 comment '缓存时间'")
    private Long cacheTime;
}
